<template>
  <div class="index">
    <el-container>
      <el-aside width="200px">
        <el-menu
          default-active="/index/business"
          active-text-color="#fb9337"
          class="el-menu"
          @select="handleSelect"
        >
          <el-menu-item index="/index/business">
            <el-icon><document /></el-icon>
            <span>出差申请</span>
          </el-menu-item>
          <el-menu-item index="/index/outside">
            <el-icon><document /></el-icon>
            <span>外勤打卡</span>
          </el-menu-item>
          <el-menu-item index="/index/leave">
            <el-icon><document /></el-icon>
            <span>请假申请</span>
          </el-menu-item>
          <el-menu-item index="/index/work">
            <el-icon><document /></el-icon>
            <span>加班申请</span>
          </el-menu-item>
        </el-menu>
      </el-aside>
      <RouterView />
    </el-container>
  </div>
</template>

<script setup>
import { useRouter } from "vue-router";

let $router = useRouter();

let handleSelect = (index) => {
  $router.push(index);
};
</script>

<style scoped lang="scss">
.index {
  height: 100%;
}
.el-menu {
  font-weight: 700;
  font-size: 26px;
}
.el-menu-item.is-active {
  background-color: rgba(255, 192, 203, 0.342);
}
</style>